home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-SPAR.{_A / OPENPROM.{1B < prev    next >
Text File  |  1999-09-17  |  2KB  |  71 lines

  1. #ifndef    _SPARC64_OPENPROMIO_H
  2. #define    _SPARC64_OPENPROMIO_H
  3.  
  4. #include <linux/ioctl.h>
  5. #include <linux/types.h>
  6.  
  7. /*
  8.  * SunOS and Solaris /dev/openprom definitions. The ioctl values
  9.  * were chosen to be exactly equal to the SunOS equivalents.
  10.  */
  11.  
  12. struct openpromio
  13. {
  14.     u_int    oprom_size;        /* Actual size of the oprom_array. */
  15.     char    oprom_array[1];        /* Holds property names and values. */
  16. };
  17.  
  18. #define    OPROMMAXPARAM    4096        /* Maximum size of oprom_array. */
  19.  
  20. #define    OPROMGETOPT        0x20004F01
  21. #define    OPROMSETOPT        0x20004F02
  22. #define    OPROMNXTOPT        0x20004F03
  23. #define    OPROMSETOPT2        0x20004F04
  24. #define    OPROMNEXT        0x20004F05
  25. #define    OPROMCHILD        0x20004F06
  26. #define    OPROMGETPROP        0x20004F07
  27. #define    OPROMNXTPROP        0x20004F08
  28. #define    OPROMU2P        0x20004F09
  29. #define    OPROMGETCONS        0x20004F0A
  30. #define    OPROMGETFBNAME        0x20004F0B
  31. #define    OPROMGETBOOTARGS    0x20004F0C
  32.  
  33. /*
  34.  * Return values from OPROMGETCONS:
  35.  */
  36.  
  37. #define OPROMCONS_NOT_WSCONS    0
  38. #define OPROMCONS_STDIN_IS_KBD  0x1     /* stdin device is kbd */
  39. #define OPROMCONS_STDOUT_IS_FB  0x2     /* stdout is a framebuffer */
  40. #define OPROMCONS_OPENPROM      0x4     /* supports openboot */
  41.  
  42.  
  43. /*
  44.  *  NetBSD/OpenBSD /dev/openprom definitions.
  45.  */
  46.  
  47. struct opiocdesc
  48. {
  49.     int    op_nodeid;        /* PROM Node ID (value-result) */
  50.     int    op_namelen;        /* Length of op_name. */
  51.     char    *op_name;        /* Pointer to the property name. */
  52.     int    op_buflen;        /* Length of op_buf (value-result) */
  53.     char    *op_buf;        /* Pointer to buffer. */
  54. };
  55.  
  56. #define    OPIOCGET    _IOWR('O', 1, struct opiocdesc)
  57. #define    OPIOCSET    _IOW('O', 2, struct opiocdesc)
  58. #define    OPIOCNEXTPROP    _IOWR('O', 3, struct opiocdesc)
  59. #define    OPIOCGETOPTNODE    _IOR('O', 4, int)
  60. #define    OPIOCGETNEXT    _IOWR('O', 5, int)
  61. #define    OPIOCGETCHILD    _IOWR('O', 6, int)
  62.  
  63.  
  64. #ifdef __KERNEL__
  65. int openprom_init(void);
  66. #endif
  67.  
  68.  
  69. #endif /* _SPARC64_OPENPROMIO_H */
  70.  
  71.